package com.core.controller;

import com.core.model.UserModel;

public class UserController extends BaseController<UserModel> {
	
	public void index() {
		
		setAttr("userPage", UserModel.dao.paginate(getParaToInt(0, 1), 10));
		render("index.html");
	}

	public void add() {
		render("add.html");
	}

	public void edit() {
		setAttr("userInfo", UserModel.dao.findById(getParaToInt()));
		render("edit.html");
	}
	
	public void update() {
		getModel(UserModel.class).update();
		redirect("");
	}
}
